<extend name="Index::index"/>
<block name="title"><title>用户管理</title></block>
<block name="table">
	<div class="agoods_nav">
		<span>用户列表</span>
	</div>
	
	<table class="table" border="1" cellspacing="0" cellpadding="5" align="center">
		<tr bgcolor="#ccc">
			<th>编号</th>
			<th>用户名</th>
			<th>注册时间</th>
			<th>状态</th>
			<th>操作</th>
		</tr>
		<foreach name="list" item="val">
			<tr>
				<td>{$val['id']}</td>
				<td>{$val['username']}</td>
				<td>{$val['regtime']|date='Y年m月d日',###}</td>
				<td width="100px;">
					<if condition="$val['status'] eq 1">
					<a href="{:U('User/change',['id'=>$val['id'],'p'=>$p])}"><button style="width:80px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">正常</button></a>
					<else/>
					<a href="{:U('User/change',['id'=>$val['id'],'p'=>$p])}"><button style="width:80px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">禁用</button></a>
					</if>
				</td>
				<td><a href="{:U('User/detail',['id'=>$val['id'],'p'=>$p])}" style="color:#000;display:block">查看详情</a><a href="{:U('User/del',['id'=>$val['id'],'p'=>$p])}" style="color:#000;display:block">删除</a></td>	
				</tr>
			</foreach>
			<tr>
				<th colspan="5">
				 	{$page}
				</th>
			</tr>
		</table>
</block>